package com.demo5;

/**
 * Created by Administrator on 2017/3/26.
 */
public class JiCheng6 {
    public static void main(String[] args) {
        Object[] object = new Object[3];
        Animal4 animal1 = new Fish4();
        Animal4 animal2 = new Tiger4();
        object[0] = animal1;
        object[1] = animal2;
        object[2] = new String("String");
        ((Fish4) object[0]).swim();
    }
}
